package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectDailyDetailEntityMapper;
import com.ly.heart.domain.ProjectDailyDetailEntity;
import com.ly.heart.service.IProjectDailyDetailEntityService;

/**
 * 工时日报明细Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectDailyDetailEntityServiceImpl implements IProjectDailyDetailEntityService
{
    @Autowired
    private ProjectDailyDetailEntityMapper projectDailyDetailEntityMapper;

    /**
     * 查询工时日报明细
     *
     * @param id 工时日报明细主键
     * @return 工时日报明细
     */
    @Override
    public ProjectDailyDetailEntity selectProjectDailyDetailEntityById(String id)
    {
        return projectDailyDetailEntityMapper.selectProjectDailyDetailEntityById(id);
    }

    /**
     * 查询工时日报明细列表
     *
     * @param projectDailyDetailEntity 工时日报明细
     * @return 工时日报明细
     */
    @Override
    public List<ProjectDailyDetailEntity> selectProjectDailyDetailEntityList(ProjectDailyDetailEntity projectDailyDetailEntity)
    {
        return projectDailyDetailEntityMapper.selectProjectDailyDetailEntityList(projectDailyDetailEntity);
    }

    /**
     * 新增工时日报明细
     *
     * @param projectDailyDetailEntity 工时日报明细
     * @return 结果
     */
    @Override
    public int insertProjectDailyDetailEntity(ProjectDailyDetailEntity projectDailyDetailEntity)
    {
        projectDailyDetailEntity.setCreateTime(DateUtils.getNowDate());
        return projectDailyDetailEntityMapper.insertProjectDailyDetailEntity(projectDailyDetailEntity);
    }

    /**
     * 修改工时日报明细
     *
     * @param projectDailyDetailEntity 工时日报明细
     * @return 结果
     */
    @Override
    public int updateProjectDailyDetailEntity(ProjectDailyDetailEntity projectDailyDetailEntity)
    {
        return projectDailyDetailEntityMapper.updateProjectDailyDetailEntity(projectDailyDetailEntity);
    }

    /**
     * 批量删除工时日报明细
     *
     * @param ids 需要删除的工时日报明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectDailyDetailEntityByIds(String[] ids)
    {
        return projectDailyDetailEntityMapper.deleteProjectDailyDetailEntityByIds(ids);
    }

    /**
     * 删除工时日报明细信息
     *
     * @param id 工时日报明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectDailyDetailEntityById(String id)
    {
        return projectDailyDetailEntityMapper.deleteProjectDailyDetailEntityById(id);
    }
}
